package com.lanou.controller;

import com.lanou.bean.ModuleInfo;
import com.lanou.service.ModuleInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by dllo on 18/3/13.
 */
@Controller
public class ModuleController {

    @Resource
    ModuleInfoService moduleInfoService;

    /**
     * 查询所有权限
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/allmodule")
    public  List<ModuleInfo>  allModule () {
        List<ModuleInfo> moduleInfos = moduleInfoService.selectAllModule();
        return moduleInfos;
    }
}
